# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>

pkgname=perl-params-classify
pkgver=0.015
pkgrel=7
pkgdesc="argument type classification"
arch=(loong64 x86_64)
license=('PerlArtistic')
url="https://search.cpan.org/~zefram/Params-Classify"
options=(!emptydirs)
depends=('perl')
makedepends=('perl-module-build')
source=("https://search.cpan.org/CPAN/authors/id/Z/ZE/ZEFRAM/Params-Classify-$pkgver.tar.gz"
        'op-sibling-fixes.patch')
sha256sums=('398ec15cd899fcd8bef3db9ea1748bf631f15f6c32be203e475b67df510a5914'
            'b9e3ce962ae98fa325e864d72347d2a172a4bcee9da867dafd087f3a9180ea7d')

prepare() {
  cd "$srcdir"/Params-Classify-$pkgver
  # https://rt.cpan.org/Public/Bug/Display.html?id=114490
#  patch -Np1 -i ../op-sibling-fixes.patch
}

build() {
  cd "$srcdir"/Params-Classify-$pkgver
  perl Build.PL installdirs=vendor destdir="$pkgdir/"
  perl Build
}

package() {
  cd "$srcdir"/Params-Classify-$pkgver
  perl Build install
  find "$pkgdir" -name perllocal.pod -delete
  find "$pkgdir" -name .packlist -delete
}
